package com.lz.service;

import com.lz.beans.AppUser;
import com.lz.dao.RegisterDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by lz on 2018/5/10.
 */
@Service
@Transactional
public class RegisterService {

    @Autowired
    private RegisterDao registerDao;

    /**
     * 注册
     * @param appUser
     */
    public int register(AppUser appUser) throws Exception{
        return registerDao.register(appUser);
    }

    /**
     * 修改密码
     * @param password
     * @param id
     * @return
     * @throws Exception
     */
    public int modifyPassword(String password, Object id) throws Exception{
        return registerDao.modifyPassword(password,id);
    }

    /**
     * 修改其他信息
     * @param appUser
     * @param id
     * @return
     */
    public int modifyInfo(AppUser appUser, Object id) throws Exception{
        return registerDao.modifyInfo(appUser,id);
    }
}
